<%-- 
    Document   : index
    Created on : 16/05/2013, 15:31:16
    Author     : Eduardo
--%>
<%@page import="java.util.*"%>
<%@page import="java.sql.*" %> 
<%@page import="java.io.*" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    if (session.getAttribute("talogado") != null && session.getAttribute("talogado").equals("true")) {
        response.sendRedirect("home.jsp");
    }
%>
<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link href="css/bootstrap-responsive.css" rel="stylesheet" media="screen">
        <title>DELC</title>
        <style>
            body {font-size: 80% !important; padding-top:70px;}
        </style>
        <script src="js/jquery.js"></script>
        <script src="js/bootstrap.min.js"></script>
    </head>
    <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="brand" href="index.jsp">DELC</a>
                    <div class="nav-collapse collapse">
                        <ul class="nav">
                        </ul></div><!--/.nav-collapse -->
                </div>
            </div>
        </div>

        <div class="container" id="main" role="main">
            <div class="row-fluid">
                <div class="row-fluid">        
                    <div class="span4 offset4 well">
                        <h2><font><font>Login</font></font></h2>
                            <%
                                if (session.getAttribute("error") != null) {
                                    out.println("<div class='alert alert-error'>");
                                    out.println("<button type='button' class='close' data-dismiss='alert'>×</button>");
                                    out.println("<strong>" + session.getAttribute("error") + "</strong>");
                                    out.println("</div>");
                                    session.setAttribute("error", null);
                                }
                            %>
                        <form id="login" name="login" method="post" class="well" action="login">
                            <input name="username" type="text" class="span12" placeholder="Usuário">
                            <input name="password" type="password" class="span12" placeholder="Senha">
                            <div class="control-group">
                                <div class="controls">
                                    <button type="submit" class="btn btn-primary"><i class="icon-play-circle icon-white"></i> Login </button>
                                </div>
                            </div>
                            <div class="control-group">
                                <div class="controls">
                                    <span><a href="esqueci-senha.jsp">Esqueceu sua senha?</a><br></span>
                                </div>
                            </div>
                        </form>
                    </div>        
                </div>

            </div>
            ﻿<hr>
            <footer>
                <%
                    //Debug  
                    /*out.print("<pre>Session: ");
                    out.print(session.getId());
                    for (Enumeration e = session.getAttributeNames(); e.hasMoreElements();) {
                        String attribName = (String) e.nextElement();
                        Object attribValue = session.getAttribute(attribName);
                        out.print("<br/>" + attribName + " = " + attribValue);
                    }
                    out.print("</pre>");*/
                %>  
                <p class="pull-right"><font><font>DELC © 2013</font></font></p>
            </footer>
        </div>
    </body>
</html>
